****
** Replication File:
**
** "The 2020 Presidential Election and Beliefs About Fraud:
** Continuity or Change?"
**
** Over time data for Figure 1
****

set more off

********************************************************************************

****
** 2012 CCES
****

* Open data
use "Clean Data, CCES 2012.dta"

* Analysis
mean voterfraud_dum

sem (<- voterfraud_dum pid), standardize
sem (<- voterfraud_dum ideo), standardize

sem (<- voterfraud_dum pidstrength), standardize

sum voterfraud_dum if rep == 1
sum voterfraud_dum if rep == 0

* Mentioned in paragraph before Finding 3
sum cancel_dum
sum cancel_dum if rep == 1
sum cancel_dum if rep == 0

clear

********************************************************************************

****
** 2016 CCES
****

* Open data
use "Clean Data, CCES 2016.dta"

* Analysis
mean voterfraud_dum 

sem (<- voterfraud_dum pid), standardize
sem (<- voterfraud_dum ideo), standardize

sem (<- voterfraud_dum pidstrength), standardize

sum voterfraud_dum if rep == 1
sum voterfraud_dum if rep == 0

sum voterfraud_dump if rep == 1
sum voterfraud_dump if rep == 0

clear

********************************************************************************

****
** 2018 CCES
****

* Open data
use "Clean Data, CCES 2018.dta"

* Analysis
mean voterfraud_dum

sem (<- voterfraud_dum pid), standardize
sem (<- voterfraud_dum ideo), standardize

sem (<- voterfraud_dum pidstrength), standardize

clear

********************************************************************************

****
** 2020 Qualtrics
****

* Open data
use "Clean Data, October 2020.dta"

* Generate voter fraud dummy variable
gen voterfraud_dum = 0
replace voterfraud_dum = 1 if voterfraud > 3

* Analysis
mean voterfraud_dum

sem (<- voterfraud_dum pid), standardize
sem (<- voterfraud_dum ideo), standardize

sem (<- voterfraud_dum pidstrength), standardize


clear 

